/**
 * 
 */
package net.udp;

import java.net.DatagramPacket;
import java.net.InetAddress;
import java.net.MulticastSocket;

/**
 * @author wangjg
 * 
 */
public class MulticastClient {
	public static void main(String[] arstring) {
		try {
			for (int i=0; i<10; i++) {
				byte[] arb = new byte[] { 'h', 'e', 'l', 'l', 'o' };
				InetAddress inetAddress = InetAddress.getByName("230.0.0.1");
				DatagramPacket datagramPacket = new DatagramPacket(arb, arb.length, inetAddress, 7777);
				MulticastSocket multicastSocket = new MulticastSocket();
				multicastSocket.send(datagramPacket);
			}
		} catch (Exception exception) {
			exception.printStackTrace();
		}
	}
}